import 'dart:convert';

import 'package:psi/entity/sales_entity.dart';
/// code : 0
/// message : "操作成功"
/// data : {"id":1,"userId":null,"sellUserName":"张三","sellPhone":"14453433456","amount":null,"realAmount":54234,"payAmount":1332,"recordTime":"2024-02-01 14:53:49","createTime":null,"isDelete":null,"itemList":[{"id":4,"sellId":1,"name":"切片钢","standards":"23*34*23","material":"苏成钢","size":"23","count":23,"price":1945,"mark":"23","isDelete":false},{"id":5,"sellId":1,"name":"卷刃","standards":"34*34*54","material":"合金钢","size":"34","count":342,"price":343,"mark":"234","isDelete":false}],"fullPay":false}

AddSalesResp addSalesRespFromJson(String str) => AddSalesResp.fromJson(json.decode(str));
String addSalesRespToJson(AddSalesResp data) => json.encode(data.toJson());
class AddSalesResp {
  AddSalesResp({
      this.code, 
      this.message, 
      this.data,});

  AddSalesResp.fromJson(dynamic json) {
    code = json['code'];
    message = json['message'];
    data = json['data'] != null ? SalesEntity.fromJson(json['data']) : null;
  }
  num? code;
  String? message;
  SalesEntity? data;
AddSalesResp copyWith({  num? code,
  String? message,
  SalesEntity? data,
}) => AddSalesResp(  code: code ?? this.code,
  message: message ?? this.message,
  data: data ?? this.data,
);
  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['code'] = code;
    map['message'] = message;
    if (data != null) {
      map['data'] = data?.toJson();
    }
    return map;
  }

}
